package calorie.com.calorie.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.lxh.baselibray.base.XActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import calorie.com.calorie.R;
import calorie.com.calorie.adapter.WristBandAdapter;
import calorie.com.calorie.response.WristBandResponce;


/**
 * 我的手环
 */
public class WristBandActivity extends XActivity {
    @BindView(R.id.rv)
    RecyclerView rv;

    List<WristBandResponce> mList;
    WristBandAdapter mAdapter;
    @Override
    public void initData(Bundle savedInstanceState) {
        mList=new ArrayList<>();
        //测试数据
        for (int i = 0; i < 5; i++) {
            mList.add(new WristBandResponce("BLE MAC：Mi_2172164123"+i));
        }
        mAdapter=new WristBandAdapter(R.layout.recy_item_wrist_band,mList);
        LinearLayoutManager manager=new LinearLayoutManager(context);
        rv.setLayoutManager(manager);
        rv.setAdapter(mAdapter);
        mAdapter.setmBindOnClickListener(new WristBandAdapter.BindOnClickListener() {
            @Override
            public void bindClick() {

            }
        });
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_wrist_band;
    }


}
